package br.ufpb.esa.plataforma.controller;

import java.io.IOException;
import java.util.List;
import java.util.ResourceBundle;

import javafx.application.Application;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.SplitPane;
import javafx.scene.control.TextArea;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import javafx.stage.Stage;

/**
 * Demonstrates a drag-and-drop feature.
 */
public class MainApplication extends Application {

	private Stage stage;
	@FXML
	private BorderPane menuLayout;
	@FXML
	private SplitPane split;
	@FXML
	private AnchorPane paneDescricao;
	@FXML
	private TextArea textArea;
	@FXML
	private AnchorPane paneFigura;
	@FXML
	private TextFlow textflow;
	private Text texto;
	@FXML
	ImageView figuraInicio;
	@FXML
	ImageView figuraFim;
	String titulo = "Would suggest grabbing the source as an Object, then checking its type before continuing.";
	
	
	public void start(Stage stage){
		this.stage = stage;
	
		try{
			inicializador();
		} catch (Exception e){
			e.printStackTrace();
		}
	}
	
	public void inicializador() throws IOException{
		FXMLLoader loader = new FXMLLoader();
        loader.setLocation(getClass().getResource("/br/ufpb/esa/plataforma/view/MenuLayout.fxml"));
        this.menuLayout = (BorderPane) loader.load();
        loader.setRoot(this);
		this.stage.setScene(new Scene(this.menuLayout));
		this.stage.setTitle("Bem Vindo ao Prog!");
		stage.show();
	}
		
	public Stage getStage(){
		return this.stage;
	}
	
	public static void main(String[] args) {
        launch(args);
    }
}
